﻿using System;

using Phidgets;

namespace Coding4Fun.BoxingBots.Robot
{
	public abstract class PhidgetInterfaceController : IDisposable
	{
		protected readonly InterfaceKit PhidgetInterfaceKit;

		internal PhidgetInterfaceController() { }

		internal PhidgetInterfaceController(InterfaceKit phidgetInterfaceKit) : this()
		{
			PhidgetInterfaceKit = phidgetInterfaceKit;
        }

		public bool IsConnected
		{
			get { return (PhidgetInterfaceKit != null && PhidgetInterfaceKit.Attached); }
		}

		public virtual void Dispose() { }
	}
}